package com.exercises;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

class Exercise1877 {


    public int minPairSum(int[] nums) {
        Arrays.sort(nums);
        int length = nums.length;
        int max = Integer.MIN_VALUE;
        for (int i = 0; i < length / 2; i++) {
            max = Math.max(max, nums[i] + nums[length - 1 - i]);
        }
        return max;
    }
}